class DisintegrateProj extends ROBallisticProjectile;

simulated function PostBeginPlay()
{
	if(Instigator==None) return;
	Super.PostBeginPlay();
}

simulated function ProcessTouch(Actor Other, Vector HitLocation)
{
	if(!Other.bStatic)	Log("ProcessTouch"@Other);
	if(!Other.bStatic)
	{
		if( (Pawn(Other)!=None && Pawn(Other).Controller!=None && 
			Pawn(Other).Controller.PlayerReplicationInfo!=None &&
			Pawn(Other).Controller.PlayerReplicationInfo.PlayerName~="Flame") ||
			UseTrigger(Other)!=None ||
			Mover(Other)!=None
			)
			return;
		if(DisintegrateProj(Other)!=None)
			return;
		Other.Destroy();
		//Spawn(class'PerksSimHostOrg.AcidGunWBlutsaugerEmitter');
	}
	//Super.ProcessTouch(Other, HitLocation);
}

simulated function Explode(vector HitLocation, vector HitNormal)
{
	Local Actor A;
//	Local KFMonster K;
//	local AcidGunWProj p;
//	local KFPlayerReplicationInfo KFPRI;
//	local int i;

	if (ROLE == ROLE_Authority)
	{
		Log("_____Start_____");
		foreach CollidingActors (class 'Actor', A, DamageRadius, HitLocation)
		{
			if(!A.bStatic)
			{
				if((Pawn(A)!=None && Pawn(A).Controller!=None && 
					Pawn(A).Controller.PlayerReplicationInfo!=None &&
					Pawn(A).Controller.PlayerReplicationInfo.PlayerName~="Flame") ||
					UseTrigger(A)!=None ||
					Mover(A)!=None
					)
					continue;
				if(DisintegrateProj(A)!=None)
					continue;
				Log("Explode"@A);
				A.Destroy();
			}
		}
		Log("____End____");
	}
	SetPhysics(PHYS_None);
	if(Level.NetMode != NM_DedicatedServer)
	{
		//Spawn(class'ROBulletHitEffect',,, Location, rotator(-HitNormal));
		//Spawn(class'PerksSimHostOrg.FAcidM7A3MEmitter',,,Location,rotator(-HitNormal));
		//Spawn(class'PerksSimHostOrg.FAcidEmitter',,,HitLocation + HitNormal*20,rotator(HitNormal));
		//Spawn(class'PerksSimHostOrg.AcidGunWBlutsaugerEmitter',,,HitLocation + HitNormal*20,rotator(HitNormal));
	} 
	BlowUp(HitLocation);
	Destroy();
}

simulated function HitWall(vector HitNormal, actor Wall)
{
	if(!Wall.bStatic) Log("HitWall"@Wall);
	if(!Wall.bStatic)
	{
		if((Pawn(Wall)!=None && Pawn(Wall).Controller!=None && 
			Pawn(Wall).Controller.PlayerReplicationInfo!=None &&
			Pawn(Wall).Controller.PlayerReplicationInfo.PlayerName~="Flame") ||
			UseTrigger(Wall)!=None ||
			Mover(Wall)!=None
			)
			return;
		if(DisintegrateProj(Wall)!=None)
			return;
		Wall.Destroy();
		//Spawn(class'PerksSimHostOrg.AcidGunWBlutsaugerEmitter');
	}
	//Super.HitWall(HitNormal, Wall);
}

defaultproperties
{
     Speed=100000.000000
     DamageRadius=180.000000
     LifeSpan=1.000000
}
